<template>
	<view>
		<stop isBack>
			<view slot="content">安全上报</view>
		</stop>
		<view class="">
			<!-- <stab :names="['']"></stab> -->
		</view>
	<!-- 	<view>
			<sentity model="ProjectPointType" placeholder="请选择审批类型" keyname="name" label="类型"
			v-model="type"></sentity>
		</view> -->
		<view class="mart3">
			<sentity model="Project" placeholder="请选择项目" keyname="name" label="项目"
			:condtion="cond" v-model="project"></sentity>
		</view>
		<!-- <view>{{project}}</view> -->
		<view class="mart3">
			<!-- <sfiles label="选择资料" v-model="files" placeholder=""></sfiles> -->
			<spics label="选择资料" v-model="enpics" placeholder=""></spics>
		</view>
		<view class="mart3">
			<stextarea label="备注" v-model="tips" placeholder="请填写备注"></stextarea>
		</view>
		<view class="bcf pad3 mart3">
			<view class="cu-btn lg bg-green tac w100 round" @click="submit">
				确认
				<ripple></ripple>
			</view>
		</view>
	</view>
</template>

<script>
	import ProjectLog from '../../../models/user/ProjectLog.js'
	let projectLog = new ProjectLog()
	
	export default {
		data() {
			return {
				cond:{_option:['my']},
				type:'',
				project:'',
				enpics:[],
				tips:''
			}
		},
		methods: {
			submit(){
				projectLog.model.pics = this.enpics
				projectLog.model.project = this.project
				projectLog.model.tips = this.tips
				projectLog.create(res=>{
					this.log(res)
					this.$com.showToast(res.i)
				})
				
				// this.$api.post("/ez/api/ProjectPoint",{
				// 	project:'/api_/projects/' + this.project,
				// 	upFiles:this.files,
				// 	tips:this.tips,
				// 	type:'/api_/project_point_types/' + this.type
				// },res=>{
				// 	this.log(res)
				// })
				
			}
		}
	}
</script>

<style>

</style>
